import { IFeidaoAiBrowserComponent } from '@dfeidao/atom-web/interfaces';
import nodejs from '@dfeidao/atom-web/msg/nodejs';
import render from '@dfeidao/atom-web/render/render';
import p002 from './p002';

export default async function a004(fd: IFeidaoAiBrowserComponent) {// 修改公司下拉框修改工厂下拉框
	// todo
	console.log('zj-000008:a004----start');

	// 获取责任部门下选择的数据编号
	const n = fd.data.node.querySelector<HTMLSelectElement>('[data-id="com"]');
	const v = n.value;

	// 根据编号确定责任人下拉框的数据
	const res = await nodejs<Array<{}>>('wyf-hManager/zj-000007/s002', { company_no: v });

	// 渲染
	render(fd, res, p002, 'p002', 'inner');

	console.log('zj-000008:a004----end');
}
